<!DOCTYPE html>
<html>

	<head lang="en">
		<meta charset="UTF-8">
		<title>课工场论坛列表</title>
		<link href="css/bbs.css" rel="stylesheet">
		<script>
			function toPost() {
				document.getElementById("post").style.display = "block";
			}

			function doPost() {
				var b = document.getElementById("bankuai").value;
				var c=document.getElementById("content").value;
				var title=document.getElementById("title").value;
				var d=new Date();
				var topic=document.getElementById("topic");
				var l=document.createElement("li");
				topic.appendChild(l);
				var d2=document.createElement("div");
				l.appendChild(d2);
				
				var m2=document.createElement("img");
				m2.setAttribute("src","images/tou01.jpg");
				d2.appendChild(m2);
				
				var h1=document.createElement("h1");
				h1.innerHTML=title;
				l.appendChild(h1);//
				var p=document.createElement("p");
				p.innerHTML="所属板块"+b+"&nbsp;<span>发表时间 "+d.toLocaleString()+"</span>";
				
				l.appendChild(p);
				
				document.getElementById("post").style.display = "none";
			}
		</script>
	</head>

	<body>
		<div class="bbs">
			<header><span onclick="toPost()">我要发帖</span></header>
			<section>
				<ul id="topic">

				</ul>
			</section>
			<div class="post" id="post">
				<input class="title" id="title" placeholder="请输入标题（1-50个字符）"> 所属版块：
				<select id="bankuai">
					<option>请选择版块</option>
					<option value="电子书籍">电子书籍</option>
					<option value="新课来了">新课来了</option>
					<option value="新手报到">新手报到</option>
					<option value="职业规划">职业规划</option>
				</select>
				<textarea class="content" id="content"></textarea>
				<input class="btn" value="发布" type="button" onclick="doPost()">
			</div>
		</div>
	</body>

</html>